<template>
    <div class="news-container">
       <div class="mui-card" v-for="item in home_newslist" :key="item.name">
               <router-link :to="'/home/newsinfo/'+item.id">
                <div class="mui-card-header">{{item.name}}</div>
                <div class=" mui-card-media" >
                    <img :src="item.url" :alt="item.name">
                </div>
                <div class="mui-card-content">
                    <div class="mui-card-content-inner">
                        {{item.content}}
                    </div>
                </div>
            <!-- <div class="mui-card-footer">页脚</div> -->
            </router-link>
        </div>
    </div>
</template>
<script>
import axios  from 'axios'
    export default {
        data(){
            return {
                home_newslist:[]
            }
        },
        methods:{
            // getInfo(){
            //     axios.get('src/json/home_swiper/home_swiper.json', {} , {emulateJSON: true}).then((response) => {
            //         console.log(response);
            //     }).catch(function (error) {
            //         console.log(error);
            //     });
            // }
        },
        mounted(){
            axios.get('src/json/home_neswlist.json', {} , {emulateJSON: true}).then((response) => {
                this.home_newslist = response.data.data;
            }).catch(function (error) {
                console.log(error);
            })
        }
        
    }
</script>
<style lang="less" scoped>
    .news-container{
        .mui-card-media{
            img{
                max-width: 100%;
            }
        }
    }
</style>
